
package com.insigma.business.qrcode.soldier.dto;

import java.util.LinkedHashMap;
import java.util.Map;


public enum GatewayTypeEnum {

    
    SOLDIER("老兵端"),

    
    GOV_EMPLOYEE("政府员工端"),

    
    COMPANY("企业员工端"),

    
    MERCHANT("商家端"),

    
    COMMON_OPEN("通用外部网关"),

    
    XXJ("信息机"),

    
    ALL("所有端通用"),

    GRAN("颗粒化模块");

    
    private String title;

    private GatewayTypeEnum(String title) {
        this.title = title;
    }

    
    public static GatewayTypeEnum getByEnumName(final String enumName) {
        for (GatewayTypeEnum element : values()) {
            if (element.name().equals(enumName)) {
                return element;
            }
        }
        return null;
    }

    
    public static Map<String, String> getName2TitleMap() {

        Map<String, String> name2TitleMap = new LinkedHashMap<>();

        for (GatewayTypeEnum element : values()) {
            name2TitleMap.put(element.name(), element.title);
        }

        return name2TitleMap;
    }

    public String getTitle() {
        return this.title;
    }

}
